home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / mkmenu.zip / MAKEMENU.DOC < prev    next >
Text File  |  1993-04-01  |  14KB  |  382 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                        MAKEMENU.DOC
  8.                  DISTRIBUTED AS SHAREWARE
  9.  
  10.             COPYRIGHT (C) JERRY ADKINS 1992
  11.  
  12.                  Jerry Adkins
  13.                  7770 Regents Rd. Suite 113-226
  14.                  San Diego, CA 92122
  15.  
  16. After creating somewhere near my millionth slidebar menu, I decided to let the
  17. computer do most of the coding for me. The result is MAKEMENU, a program
  18. written in Turbo C, that creates slidebar menu programs in Turbo C, BASIC,
  19. DBASE, and Turbo Pascal. It occured to me, that other programmers might find
  20. MAKEMENU of use. MAKEMENU was not designed to compete with those great user
  21. interface design programs. It does a simple job of creating pretty little slide
  22. bar menus. However, at the $10 registration fee, the price is right.
  23.  
  24. If you find MAKEMENU of benefit, please fill out the registration form and mail
  25. it in.
  26.  
  27. ------------------------------------------------------------------------------
  28.  
  29.  
  30.                        MAKEMENU REGISTRATION FORM
  31.  
  32.                        MAIL TO:
  33.  
  34.                        JERRY ADKINS
  35.                        7770 REGENTS RD. SUITE 113-226
  36.                        SAN DIEGO, CA 92122
  37.  
  38.  
  39. NAME: __________________________________ COMPANY:_____________________________
  40.  
  41.  
  42. STREET: ________________________________ CITY: _______________________________
  43.  
  44.  
  45. STATE: ________________ ZIP: ________________
  46.  
  47.  
  48. WHAT SOURCE DISTRIBUTED MAKEMENU TO YOU? _____________________________________
  49.  
  50.  
  51. MAKEMENU VERSION DESIRED: (CIRCLE ONE).
  52.  
  53.           (1) MAKEMENU WITH COMPACT MODEL C LIBRARY
  54.               AND TURBO PASCAL 6.0 TPU FILES             $10
  55.  
  56.           (2) MAKEMENU (ALL MODELS) WITH C LIBRARY
  57.               SOURCE AND PASCAL TPU SOURCE               $20
  58.  
  59.           (Owners of (1) may upgrade to (2) at any time)
  60.  
  61. DISK FORMAT DESIRED: (CIRCLE ONE).
  62.  
  63.           (1)  3.5  INCH 720K
  64.  
  65.           (2)  5.25 INCH 360K
  66.  
  67. SUGGESTIONS:
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. ------------------------------------------------------------------------------
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. MAKEMENU.DOC   INDEX
  86. ------------------------------------------------------------------------------
  87.                  STARTUP SCREEN                PAGE 1
  88.                  CREATE NEW MENU FILE          PAGE 2
  89.                  LOAD MENU FILE FROM DISK      PAGE 3
  90.                  SAVE MENU FILE TO DISK        PAGE 3
  91.                  GENERATE SOURCE CODE          PAGE 4
  92.                  EDIT MENU COLORS              PAGE 5
  93.                  MENU IDEAS                    PAGE 6
  94.                  COMPILING GENERATED PROGRAMS  PAGE 7
  95.                  COMING ATTRACTIONS            PAGE 8
  96. ------------------------------------------------------------------------------
  97.  
  98.                    PAGE 1 - STARTUP SCREEN:
  99.  
  100.            ┌───────────────────────────────────────────────────────┐
  101.            │                   MAKEMENU                            │
  102.            │        COPYRIGHT (C) JERRY ADKINS 1992                │
  103.            └───────────────────────────────────────────────────────┘
  104.                         ╒══════════════════════════╕
  105.                         │ CREATE NEW MENU FILE     │
  106.                         │ EDIT MENU FILE           │
  107.                         │ LOAD MENU FILE FROM DISK │
  108.                         │ SAVE MENU FILE TO DISK   │
  109.                         │ GENERATE SOURCE CODE     │
  110.                         │ EDIT MENU COLORS         │
  111.                         │ QUIT                     │
  112.                         ╘══════════════════════════╛
  113.  
  114.  
  115. The startup screen allows you to select options with the up/down arrow keys
  116. and ENTER. Your generated programs will look much like this screen. Menus
  117. generated in Turbo C have two different style menus.
  118.  
  119.  
  120. ------------------------------------------------------------------------------
  121.                    PAGE 2 - CREATE NEW MENU FILE:
  122.  
  123. Creating a new menu is as simple as entering text. Although you are allowed
  124. five lines for a title, menus with a lot of options should keep titles to a
  125. minimum to make more room for the menu options.
  126.  
  127. For each menu option, there are three entries: LINE, ACTION, and HELP. You
  128. may toggle between these entries with the TAB key.
  129.  
  130. Each LINE entry is the text that will be displayed in the actual menu. Each
  131. corresponding ACTION entry is the statement that will be executed when any
  132. LINE is highlighted by the slidebar. The corresponding HELP entry will be
  133. highlighted just below the last menu option. This changes as new options are
  134. highlighted.
  135.  
  136.  
  137. TITLE  1 : MY TEST MENU
  138. TITLE  2 : CREATED BY JERRY ADKINS
  139. TITLE  3 :
  140. TITLE  4 :
  141. TITLE  5 :
  142.  
  143.  
  144.  
  145. LINE  1 : DOS DIRECTORY                ACTION: system("dir");getch()
  146. LINE  2 : CHECK DISK                   ACTION: system("chkdsk");getch()
  147. LINE  3 : WORD PROCESSING              ACTION: system("wp")
  148. LINE  4 : SPREADSHEET                  ACTION: system("lotus")
  149. LINE  5 : QUIT                         ACTION: exit(0)
  150.  
  151. HELP: DO A DOS DIR COMMAND
  152. HELP: RUN CHKDSK PROGRAM
  153. HELP: RUN WORD PERFECT
  154. HELP: RUN LOTUS 123
  155. HELP: EXIT TO DOS
  156.  
  157. In the above example, we are only using five options. There is a maximum of
  158. fifteen options, with the exception of Dbase and the Turbo C menu #1, which
  159. has a maximum of nine options.
  160.  
  161. The ACTION entries are unique to each language. If you are only experimenting
  162. with MAKEMENU, leave these options blank. That way, you can create programs in
  163. any of the four supported languages and they should compile with no trouble.
  164.  
  165. ------------------------------------------------------------------------------
  166.                    PAGE 3 - LOAD MENU FILE FROM DISK:
  167.  
  168. A MENU file consists of all the menu options. This is all that is needed to
  169. generate your program. These files are saved with the SAVE MENU FILE option.
  170.  
  171. The same MENU file can be used to generate programs in any of the four computer
  172. languages supported. The only difference is the ACTION statements which are
  173. supplied by you and are unique to each language.
  174.  
  175.    BASMENU.MEN│
  176.       MENU.MEN│
  177.     TPMENU.MEN│
  178.     TCMENU.MEN│
  179.  
  180. FILENAME: MENU.MEN
  181.  
  182.                    SAVE MENU FILE TO DISK:
  183.  
  184. After you create a new menu, or edit a previously saved menu, use this option
  185. to save the menu file. Each menu file holds all the menu and color options to
  186. generate your menu program or function. These files are only a little over 2k
  187. apiece, so you could save dozens of them to a diskette.
  188.  
  189. ------------------------------------------------------------------------------
  190.                    PAGE 4 - GENERATE SOURCE CODE:
  191.  
  192. MAKEMENU has the ability to create programs in BASIC, DBASE, C, and PASCAL.
  193. In the example below, we are creating a menu program in BASIC. Since GWBASIC
  194. and BASICA require line numbers and most COMPILERS do not, you are provided
  195. with the option to use line numbers or not. There are no GOTO statements
  196. written in the code, so labels aren't even needed. Hopefully, the source code
  197. written by MAKEMENU will help serve as an example that a fairly complex program
  198. can be written without excessive use of the GOTO.
  199.  
  200. If you answer "Y" to the USE LINE NUMBERS question, you may provide the
  201. starting line number and the increment. For instance, you could have the
  202. code start at line 1000 with an increment of 5. That way, you would have
  203. line 1000, 1005, 1010, etc. If you are using a BASIC compiler, it is
  204. suggested that you don't use line numbers.
  205.  
  206.  
  207.                            CHOOSE LANGUAGE
  208.                         ╒═══════════════════╕
  209.                         │ BASIC             │
  210.                         │ DBASE III +       │
  211.                         │ TURBO C 2.0       │
  212.                         │ TURBO PASCAL 6.0  │
  213.                         │ ABORT             │
  214.                         ╘═══════════════════╛
  215.  
  216.                       CREATE BASICA/GWBASIC CODE
  217.  
  218.          ╒══════════════════════[ SAVE FILE ]════════════════════════╕
  219.          │ BASIC FILENAME TO SAVE: BASMENU.BAS                       │
  220.          │ USE LINE NUMBERS? (Y/N) : Yes                             │
  221.          │ STARTING LINE NUMBER: 10                                  │
  222.          │ INCREMENT BETWEEN LINES: 10                               │
  223.          │                                                           │
  224.          ╘═══════════════════════════════════════════════════════════╛
  225.  
  226.          ╒══════════════════════[ SAVE FILE ]════════════════════════╕
  227.          │ CREATING BASIC FILE BASMENU.BAS ...                       │
  228.          │                                                           │
  229.          │                                                           │
  230.          ╘═══════════════════════════════════════════════════════════╛
  231.  
  232. After the program is created, you may compile it, or include it in an existing
  233. program you may be working on. If you used line numbers, you can run it from
  234. BASICA, or GWBASIC at the DOS prompt:
  235.    basica basmenu
  236.  
  237. ------------------------------------------------------------------------------
  238.                    PAGE 5 - EDIT MENU COLORS:
  239.  
  240. This option allows you to change the colors in the generated menus. A screen
  241. of 15 colors will be displayed. Type in the colors when prompted. The correct
  242. code will be generated in your programs to produce the colors.
  243.  
  244.                     COLOR:   0
  245.                     COLOR:   1
  246.                     COLOR:   2
  247.                     COLOR:   3
  248.                     COLOR:   4
  249.                     COLOR:   5
  250.                     COLOR:   6
  251.                     COLOR:   7
  252.                     COLOR:   8
  253.                     COLOR:   9
  254.                     COLOR:   10
  255.                     COLOR:   11
  256.                     COLOR:   12
  257.                     COLOR:   13
  258.                     COLOR:   14
  259.                     COLOR:   15
  260.  
  261.  
  262.          SCREEN BACKGROUND COLOR  0
  263.          MENU TEXT COLOR          15
  264.          MENU BAR COLOR           4
  265.          MENU BACKGROUND COLOR    1
  266.  
  267. ------------------------------------------------------------------------------
  268.                    PAGE 6 - MENU IDEAS:
  269.  
  270. The generated menus are intended mostly for creating menu code to be included
  271. in a program. The programmer does the rest.
  272.  
  273. One interesting use, however, could be a DOS menu that runs from a BATCH file
  274. with branching done by the ERRORLEVEL dos function. A menu could return an
  275. errorlevel to DOS. This is done in Pascal with the Halt(n) procdure. It is done
  276. in C with the exit(n) function. The following is an example menu text that is
  277. intended for Pascal. The advantage of this system is it takes no memory away
  278. from the application.
  279.  
  280. TITLE  1 : MENU SYSTEM
  281. TITLE  2 : CREATED BY JERRY ADKINS
  282.  
  283. LINE  1 : WORD PROCESSING              ACTION: Halt(100);
  284. LINE  2 : SPREADSHEET                  ACTION: Halt(90);
  285. LINE  3 : INVOICING                    ACTION: Halt(80);
  286. LINE  4 : PRODIGY                      ACTION: Halt(70);
  287. LINE  5 : QUIT                         ACTION: Halt(60);
  288.  
  289. HELP: WORD PERFECT
  290. HELP: LOTUS 123
  291. HELP: DBASE INVOICE PROGRAM
  292. HELP: LOG ON TO PRODIGY
  293. HELP: EXIT TO DOS
  294.  
  295. We will use the example to generate a program called MYMENU.PAS
  296.  
  297. After the Pascal code is created and compiled, you could then write a DOS batch
  298. file called MENU.BAT which looks something like this: Yes, I used GOTO to avoid
  299. having to break it down into several BATCH files.
  300.  
  301. @echo off
  302. :start
  303. cd\
  304. cls
  305. mymenu
  306. if errorlevel 100 goto WP
  307. if errorlevel 90 goto 123
  308. if errorlevel 80 goto INVOICE
  309. if errorlevel 70 goto PRODIGY
  310. if errorlevel 60 goto end
  311. goto start
  312. :WP
  313. cd \wp
  314. wp
  315. goto start
  316. :123
  317. cd \lotus
  318. lotus
  319. goto start
  320. :INVOICE
  321. cd \invoice
  322. dbase invoice
  323. goto start
  324. :PRODIGY
  325. cd \prodigy
  326. prodigy
  327. goto start
  328. :end
  329.  
  330. ------------------------------------------------------------------------------
  331.                    PAGE 7 - COMPILING GENERATED PROGRAMS:
  332.  
  333. For our examples, we will use the following source code names (default).
  334.  
  335. TURBO C
  336.    tcc -mc tcmenu menulib.lib
  337.  
  338. The library files are compiled using the compact model, so you will need to
  339. use the -mc option. If you ordered the library source code, you can rebuild the
  340. library with the BUILDLIB.BAT batch file. If you want a different memory model,
  341. modify the BUILDLIB.BAT file and change the -mc options. This will allow you to
  342. compile using your favorite memory model.
  343.  
  344. TURBO PASCAL 6.0
  345.    tpc /m tpmenu
  346.  
  347. The needed units are compiled with Turbo Pascal 6. If you have the source code
  348. to the TPU files and you have a earlier version (4.0 +), you can rebuild the
  349. program with:
  350.    tpc /b tpmenu
  351.  
  352. DBASE
  353.    dbase dbmenu
  354.  
  355.    The generated program should run in interpreted DBASE, or compiled with a
  356. DBASE compiler, such as CLIPPER.
  357.  
  358. BASIC
  359.    basica basmenu
  360.  
  361.    The generated program runs under BASICA or GWBASIC, if you used the line
  362. number option. It should compile with BASCOM, QBASIC, or QUICK BASIC with, or
  363. without line numbers. No goto statements or labels are used in the code. You
  364. may still use labels and GOTO in any program that uses your generated menu.
  365.  
  366. ------------------------------------------------------------------------------
  367.                    PAGE 8 - COMING ATTRACTIONS:
  368.  
  369. Improvements to future versions of MAKEMENU include:
  370.  
  371.    MOUSE SUPPORT for both MAKEMENU and the generated programs.
  372.    Ability to locate a menu anywhere in the screen before generating program.
  373.    Multiple action statements for each menu option.
  374.  
  375. Send your suggestions along with your registration. They will be given the
  376. utmost consideration.
  377.  
  378. *
  379.    Turbo Pascal ,Turbo C, and Dbase are trademarks of Borland International.
  380.    QUICK BASIC is a trademark of Microsoft.
  381.  
  382.